{-- 
    Test code for for 'https://github.com/Frege/frege/issues/234 Issue 234'
    
    This code used to complain about ambiguous overloads:
    
    > overloaded new is ambiguous at type String→U 
    > It could mean one of 
    >   U.newα :: String → U 
    >   U.newβ :: String → Throwable → U 
    >   A.new  :: String → U
-}

module tests.comp.Issue234 where

data U = pure native frege.runtime.Undefined where
    pure native new :: String -> U | String -> Throwable -> U
    
data A = pure native java.lang.IllegalArgumentException where
    pure native new :: String -> U

x = U.new "foo" :: U

main = println "Ok, since compiled." 
